 #include <iostream>
using namespace std;

int main() 
{
	int n = 0;
	cin >> n;
	int pos = n;
	int count = 0;
	while (pos)
	{
		if ((pos & 1) == 1) count++;
		pos = pos >> 1;
	}
	cout << count;
}
